#include"employee.h"
//构造函数，用于初始化员工的属性
Employee::Employee(int Id, string name, int did)
{
    this->m_Id = Id;     //默认指针this，谁调用指向谁
    this->m_Name = name;
    this->m_DeptId = did;
}
//显示个人信息
void Employee::showInfo()  //virtual关键字必须在类内部使用，故前面不需要加上virtual
{
    cout << "职工编号：" << this->m_Id    //this指针效果同上
        << "\t职工姓名 " << this->m_Name
        << "\t岗位：" << this->getDeptName()
        << "\t岗位职责: 完成经理交给的任务" << endl;
}
//获取岗位
string Employee::getDeptName()
{
    return  string("员工");
}